[20250919] BOJ / G5 / 현수막 걸기 / 한종욱 #929
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/30459
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
말뚝 2개와 깃대 1개로 현수막을 걸려고 하는데 최대 현수막 넓이가 몇이니? (대신 R보다 작거나 같은 것 중에)
🔍 풀이 방법
양쪽 말뚝을 두 개 고정하고 넓이 조건을 만족하는 최대 높이의 깃대를 이분 탐색
⏳ 회고
처음에 하나의 말뚝을 고정하고 반대편의 말뚝을 이분 탐색을 하고 거기서 최댓값을 찾았는데, 이렇게 풀면 단조성을 보장하지 못했다.